Add BlockContext::float_snapshot/restore_float_snapshot for speculative float placement - #1068
Draft
nicoburns wants to merge 1 commit into
Draft
Conversation
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
devin-ai-integration
Bot
force-pushed
the
devin/1786127796-float-snapshot
branch
from
August 7, 2026 20:26
d504f52 to
439fbba
Compare
nicoburns
force-pushed
the
devin/1786127796-float-snapshot
branch
from
August 7, 2026 20:27
439fbba to
2aa0b63
Compare
nicoburns
force-pushed
the
devin/1786127796-float-snapshot
branch
from
August 7, 2026 20:30
2aa0b63 to
90e4db4
Compare
devin-ai-integration
Bot
force-pushed
the
devin/1786127796-float-snapshot
branch
from
August 13, 2026 21:11
90e4db4 to
28a2a6c
Compare
devin-ai-integration
Bot
force-pushed
the
devin/1786127796-float-snapshot
branch
from
August 13, 2026 21:12
28a2a6c to
9010d12
Compare
devin-ai-integration
Bot
force-pushed
the
devin/1786127796-float-snapshot
branch
from
August 18, 2026 21:16
9010d12 to
4ee2990
Compare
devin-ai-integration
Bot
force-pushed
the
devin/1786127796-float-snapshot
branch
from
August 21, 2026 12:14
4ee2990 to
d9bbf63
Compare
This was referenced Aug 21, 2026
nicoburns
force-pushed
the
devin/1786127796-float-snapshot
branch
from
August 21, 2026 15:21
d9bbf63 to
473b3fa
Compare
…ve float placement
nicoburns
force-pushed
the
devin/1786127796-float-snapshot
branch
from
August 21, 2026 15:38
473b3fa to
6b00476
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Objective
Part 5/5 of the float placement fixes split from #1063 (stacked on #1067).
Adds a small public API for callers integrating inline layout (e.g. Blitz):
An inline layout engine may need to place a float mid-line before knowing whether the line's content fits beside it (e.g.
white-space: nowrapor unbreakable content discovered later on the line). The snapshot lets it speculatively place floats and roll them back if the line must be re-laid without them. DioxusLabs/blitz#628 currently pins #1067's head (so its revocable-float logic is temporarily removed); re-adding it on top of this API fixes WPTfloat-nowrap-3/9.htmlthere.Feedback wanted
This is a pragmatic clone/restore API; happy to reshape it (e.g. a transactional guard type) if preferred.
Context
Stack (bottom-up): rules 3&7 overflow (#1064) → margin collapse (#1065) → height-aware slots (#1066) → zero-height floats (#1067) → this PR. Together they supersede #1063 (closed). Latest WPT verification: blitz
css/CSS2/floats+floats-clear= 246 PASS / 91 FAIL / 0 CRASH of 337 with #1066+#1067 + DioxusLabs/blitz#628 (19 newly passing vs blitz main's 227/110/0; +2 more —float-nowrap-3/9— with this PR's API used).Link to Devin session: https://app.devin.ai/sessions/2aa49a15ca484966b5b71922bfd2bb58
Requested by: @nicoburns